package com.xxxx.controller;

import com.xxxx.pojo.Company;
import com.xxxx.pojo.ResponseResult;
import com.xxxx.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author Lionel
 * @Date 2021/3/11 16:08
 * Created by IntelliJ IDEA 2020.1.
 * Project: house
 * Description：公司Controller
 */
@Controller
@RequestMapping("/company")
public class CompanyController extends BaseController {

    @Autowired
    private CompanyService companyService;

    @PostMapping("/getAllCertifyCompany")
    @ResponseBody
    public ResponseResult<List<Company>> getAllCertifyCompany () {
        ResponseResult<List<Company>> result = new ResponseResult<>();
        List<Company> list = companyService.getCompanyByStatus(1);
        result.setData(list);
        return result;
    }

}
